﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace _693607_Davies_GameUI2
{
	public partial class Form1 : Form
	{
		public Form1()
		{
			InitializeComponent();
		}

		private void buttonNewGame_Click(object sender, EventArgs e)
		{
			GameForm gameForm = new GameForm();
			gameForm.playername = textBoxName.Text;
			gameForm.Show();

			//this.Hide();
		}

		private void buttonExit_Click(object sender, EventArgs e)
		{
			this.Close();
		}

		private void buttonHighscores_Click(object sender, EventArgs e)
		{
			HighscoreForm highscoreForm = new HighscoreForm();
			highscoreForm.Show();
		}

		private void textBoxName_TextChanged(object sender, EventArgs e)
		{
			if (textBoxName.Text != "")
			{
				buttonNewGame.Enabled = true;
			}
		}
	}
}
